package cn.frank.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.stereotype.Service;

/**
 * @author Frank
 * @date 05-28
 */

@Service
public class WebSocketService {

    @Autowired
    private SimpMessagingTemplate template;

    public void sendMessage(String destination, Object payload) {
        this.template.convertAndSend(destination, payload);
    }
}
